package com.bdqn.t382.mapper.user.Supplier;

import com.bdqn.t382.mapper.user.entity.Storage;
import com.bdqn.t382.mapper.user.entity.Supplier;
import com.bdqn.t382.mapper.user.entity.SysRole;
import com.bdqn.t382.mapper.user.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysUserMapper {

    public int count();

    public List<SysUser> getUserList();

    public List<SysUser> getUsersByRealName(String realName);

    public List<SysUser> getUserListByPojo(SysUser sysUser);

    public List<SysUser> getUserListByMap(Map<String, Object> userMap);

    public List<SysUser> getUserListByParams(@Param("realName") String realName, @Param("roleId") int roleId);

    public List<SysUser> getUserListWithRoleName(SysUser sysUser);

    public List<SysUser> getUserListByRoleId(@Param("roleId") Integer roleId);

    public List<SysUser> getUserAndAddressesByUserId(@Param("userId") Integer userId);

    public int add(SysUser user);

    public int modify(SysUser user);

    public int updatePwd(@Param("id") Integer id, @Param("password") String pwd);

    public int deleteUserById(@Param("id") Integer id);

    public List<SysUser> selectList(@Param("realName")String realName,@Param("roleId")Integer roleId);

    public List<SysUser> selectListByChoose(@Param("realName") String realName,@Param("roleId") Integer roleId,@Param("account") String account,@Param("createdTime") Date createdTime);

    public List<SysUser> getUserByRoleIdArray(Integer[] roleIds);

    public List<SysUser> getUserByRoleIdList(List<Integer> roleList);

    public List<SysUser> getUserByRoleIdMap(Map<String,Object> roleMap);
    public int update(SysUser sysUser);

     public List<SysUser> selectPageList(@Param("realName")String realName
     ,@Param("roleId")Integer roleId
     ,@Param("pageBegin")Integer pageBegine
     ,@Param("pageSize")Integer pageSize);

     public List<SysUser> addressList(@Param("userId") Integer userId);

     //实战1 查询入库记录表
    public List<Storage>  getrecordList(Storage storage);

    //实战2
    public List<Storage> getStorageListSupName(Storage storage);

    //实战3
    List<Storage> getStorageSupper();

    //实战4
    List<Storage> getSupperList();

    //简答增加
    public int addSysRole(SysRole sysRole);

    //简答修改
    public int updateSysRole(SysRole sysRole);

    //简答删除
    public int deleteSysRole(@Param("id") Integer id);

    //简答模糊查询
    public List<SysRole> getSysRoleList(@Param("roleName") String roleName);

    //实战1和2
    public List<Storage> getPayStatusList(@Param("supplierId") Integer supplierId,@Param("payStatus") Integer payStatus,@Param("goodsName") String goodsName);

    //实战3
    public List<Supplier> getSupplierChooseList(@Param("supName") String supName,@Param("supCode") String supCode,@Param("supContact") String supContact,@Param("createdTime") Date createdTime);

    //实战4
    public List<Storage> storageSupplierIdsArray(Integer[] supplierIds);

    public List<Storage> storageSupplierIdsList(List<Integer> supplierIds);

    public List<Storage> storageCodeMap(Map<String, Object> SrCodeMap);

    public int updateIdSupplier(Supplier supplier);

    public int updateSupplierTrim(Supplier supplier);


    public int updateIdSysRole(SysRole sysRole);

    public List<SysRole> SysRolePageList(@Param("roleName") String roleName, @Param("currPageNo") Integer currPageNo, @Param("pageSize") Integer pageSize);
}
